export const handleCityTree = (citys) => {
  // 'xx结尾表示全部'
  citys.forEach((item) => {
    item.children.unshift({ name: '全部', id: item.id + '00xx', children: []});
    item.children.forEach((city) => {
      if (city.children && Array.isArray(city.children)) {
        city.children.unshift({ name: '全部', id: city.id + '0000xx', children: [] });
        }
    })
  })
}

export const formatHttp2Https = (url: string): string => {
  if (!url) return '';
  return url.replace(/^http:\/\//i, 'https://');
}